   1 clear ;BC=0
   2 print "2000 AD";FC=127;for E=1to 500;next E
   3 clear ;FC=0
  10 NT=0;K=0;J=0;B=rnd (2)
  15 goto 70
  20 box 0,-22,160,1,1
  30 box 0,-9,160,1,1
  40 box 0,0,160,1,1
  50 box 0,6,160,1,1
  60 box 0,8,42,1,1;box 50,8,40,1,1;box -50,8,40,1,1
  65 goto 365
  70 line 39,6,4;line 79,-6,3;line 24,6,4
 100 line 79,-29,3;line 9,6,4;line 55,-44,3;line 4,6,4
 150 line 20,-44,3;line 0,6,4;line -20,-44,3
 170 line -5,6,4
 180 line -60,-44,3
 190 line -15,6,4
 200 line -80,-20,3
 210 line -30,6,4
 220 line -80,-6,3
 250 line -80,14,4;line -39,35,3;line 0,18,3;line 48,41,3
 290 line 79,24,3
 295 goto 20
 365 for T=1to 180;&(10)=T;BC=0;FC=30;next T
 400 Q=8;BC=0;FC=30;&(22)=0
 408 X=X+JX(1)mul Q
 410 Y=Y+JY(1)mul Q
 411 if X>79X=72
 414 if X<-79X=-72
 416 if Y>42Y=38
 418 if Y<-42Y=-38
 420 box X,Y,6,1,3;box X,Y+1,3,1,3;box X,Y,6,1,3;box X,Y+1,3,1,3
 435 Q=10
 440 D=D+JX(2)mul Q
 450 S=S+JY(2)mul Q
 452 if D>79D=75
 454 if D<-79D=-75
 456 if S<-41S=-38
 458 if S>6S=5
 460 box D,S,3,3,3;box D,S,3,3,3
 480 line X,Y,4
 490 H=(KN(1)div 16)mul 10+4
 495 P=(KN(2)div 16)mul 10
 700 if TR(1)=1goto 950
 800 if TR(2)=1goto 1900
 900 goto 400
 950 &(16)=18;&(17)=17;&(18)=17;&(19)=14;&(20)=65;&(21)=140;&(22)=151;&(23)=0
1000 for F=1to 2
1010 line -H,S,3;line X,Y,4;next F
1015 gosub 15000
1050 H=-H
1052 if H<D+6if H>D-6goto 1100
1060 goto 1900
1100 for V=1to 8
1105 line D,S,4
1110 line D+rnd (6),S+rnd (4),3;line D+rnd (6),S+rnd (4),3
1115 &(21)=255;&(23)=69;&(16)=77;&(18)=200;&(19)=19;&(22)=36;&(20)=139
1118 next V
1119 gosub 15000
1120 K=K+1;if K=5goto 11000
1125 D=0;S=-34
1140 goto 1900
1490 goto 1450
1900 if TR(2)=1goto 1975
1960 goto 400
1975 goto 2000
2000 for G=1to 2
2002 line X,Y,4
2010 line D,S,4
2020 line P,Y,3
2030 &(16)=0;&(17)=40;&(18)=41;&(19)=41;&(20)=194;&(21)=200;&(22)=43;&(23)=0
2040 next G
2045 gosub 15000
2050 if P<X+7if P>X-7goto 10000
2075 goto 400
10000 line X,Y,4
10005 U=1
10010 line X+4,Y-U+3,3
10015 line X,Y-U,3
10019 box X,Y-1,1,1,3
10020 line X,Y,4
10055 &(16)=108;&(17)=109;&(18)=109;&(19)=104;&(20)=109;&(21)=70;&(22)=9;&(23)=0
10060 for U=1to rnd (20)+28
10070 line X+4,Y-U+3,3
10080 line X,Y-U,3
10090 next U
10093 &(21)=255;&(23)=255;&(16)=25;&(17)=99
10094 X=21;Y=30
10095 gosub 15000
10096 J=J+1
10097 if J=5goto 11000
10099 X=21;Y=30
10100 goto 400
11000 clear ;print "ALIEN INVADERS";print K;print "                                     STAR BASE";print J
12000 gosub 15000
13020 print 
13030 print 
13040 for L=16to 23;&(L)=0;next L
14000 print "PRESS TR 1 TO RESTART
14050 if TR(1)=1goto 5
14075 goto 14050
15000 for L=21to 23;&(L)=0;next L;return 
:return ;run 
